package com.atguigu.ssyx.api;

import com.atguigu.ssyx.service.IUserService;
import com.atguigu.ssyx.vo.user.LeaderAddressVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "团长接口")
@RestController
@RequestMapping("/api/user/leader")
public class LeaderAddressApiController {
    @Autowired
    private IUserService userService;

    /**
     * 根据id查询提货点和团长信息。
     * @param userId
     * @return
     */
    @GetMapping("/inner/getUserAddresByUserId/{userId}")
    public LeaderAddressVo getUserAddresByUserId(@PathVariable("userId") Long userId) {
        LeaderAddressVo leaderAddressVoByUserId = userService.getLeaderAddressVoByUserId(userId);
        return leaderAddressVoByUserId;
    }


}
